<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Live extends Model
{
    use HasFactory;
    
    protected $table = 'live';
    protected $guarded = [];

    /**
     * 直播信息添加入库
     * @param $data
     * @return mixed
     */
    public static function addLive($data)
    {
        return self::create($data);
    }

    /**
     * 商品列表展示
     * @return mixed
     */
    public static function liveList(){
        return self::get();
    }
}
